﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Kona.Infrastructure;
using Kona.Model;
using StructureMap;
using System.Runtime.Serialization;
namespace Microsoft.Web.Commerce.Plugins {

    public class KonaPlugin : Plugin {

        protected ICustomerRepository CustomerRepository;
        protected IOrderRepository OrderRepository;
        protected IProductRepository ProductRepository;
        protected IObjectStore ObjectStore { get; set; }
        protected DbCommon DB;
        public KonaPlugin(){
            ObjectStore = new ObjectStore();
            CustomerRepository = (ICustomerRepository)ObjectFactory.GetInstance<ICustomerRepository>();
            OrderRepository = (IOrderRepository)ObjectFactory.GetInstance<IOrderRepository>();
            ProductRepository = (IProductRepository)ObjectFactory.GetInstance<IProductRepository>();
            ObjectStore = (IObjectStore)ObjectFactory.GetInstance<IObjectStore>();
        }
        public String ViewName { get; set; }
        public string DisplayZone { get; set; }
        public KonaPlugin(IProductRepository productRepository, 
            ICustomerRepository customerRepositor, 
            IOrderRepository orderRepository,
            IObjectStore objectStore) {
            CustomerRepository = customerRepositor;
            OrderRepository = orderRepository;
            ProductRepository = productRepository;
            ObjectStore = objectStore;

        }

    }
}
